package com.service;

import com.service.form.StorageForm;
import com.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "site", contextId = "storageApiService")
public interface StorageApiService {

    @GetMapping("findAllStorageByPageAndWasteType")
    Result findAllStorageByPage(@RequestParam("wasteType") String wasteType, @RequestParam("current") Integer current, @RequestParam("pageSize") Integer pageSize);

    @PostMapping("addStorage")
    Result addStorage(@RequestBody StorageForm storageForm);

    @PostMapping("setStorageCapacityByStorageId")
    Result setStorageCapacityByStorageId(@RequestParam("storageCapacity") double storageCapacity,
                                          @RequestParam("storageId") Integer storageId);

}
